﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<div class="modal-dialog x-modal-dialog" style="width: 650px; margin-top: 100px;">
    <div class="modal-content">

        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">
                <span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
            </button>
            <h4 class="modal-title">Principal&nbsp;-&nbsp;Add User</h4>
        </div>
        
        <!-- context host changed to '/principals/add' to match href defined for button 'add'-->
        <form class="form-horizontal ihg-form" role="form" method="POST" action="${ctx.host}/principals" data-validate="true">

            <div class="modal-body">

                <div class="form-group ihg-form-group">
                    <label class="col-xs-4 control-label">用户名称</label>
                    <div class="col-xs-6">
                        <input type="text" class="form-control" name="name" value="${principal.name}" data-validate="required" />
                    </div>
                </div>

                <div class="form-group ihg-form-group">
                    <label class="col-xs-4 control-label">手机号</label>
                    <div class="col-xs-6">
                        <input type="text" class="form-control" name="phone" value="${principal.phone}"/>
                    </div>
                </div>

                <div class="form-group ihg-form-group">
                    <label class="col-xs-4 control-label">医院</label>
                    <div class="col-xs-6">
                        <input type="text" class="form-control date" name="district" value="${principal.district}"  data-validate="required" />
                    </div>
                </div>

                <div class="form-group ihg-form-group">
                    <label class="col-xs-4 control-label">科室</label>
                    <div class="col-xs-6">
                        <input type="text" class="form-control date" name="speciality" value='${principal.speciality}'  data-validate="required"/>
                    </div>
                </div>
                
                <div class="form-group ihg-form-group">
                    <label class="col-xs-4 control-label">职称</label>
                    <div class="col-xs-6">
                        <input type="text" class="form-control date" name="title"  value="${principal.title}" />
                    </div>
                </div>
                
                <div class="form-group ihg-form-group">
                    <label class="col-xs-4 control-label">详情</label>
                    <div class="col-xs-6">
                        <textarea class="form-control date" name = "discription"  rows="3"></textarea>
                    </div>
                </div>
                
            </div>

            <div class="modal-footer">
                <button type="submit" class="btn btn-success btn-shadow btn-shadow-success x-btn">Commit</button>
                <button type="button" class="btn btn-default btn-shadow btn-shadow-default x-btn" data-dismiss="modal">Cancel</button>
            </div>
            
        </form>
        
    </div>

</div>